The present invention relates to an improved digital filtering method and device which permit efficient filtering processing where filtering arithmetic operations are executed every plurality of samples in an intermittent manner, and a sound image localizing device which, using the improved digital filtering method, can suitably impart a high-quality sound image localization effect to sound waveform data.
A variety of sound image localizing devices have been developed and marketed in recent years, to achieve sounds full of a sense of xe2x80x9cpresencexe2x80x9d. As a system intended for use in movies, music concerts and the like, the so-called xe2x80x9c5.1 channel techniquexe2x80x9d has been standardized, according to which three-channel speakers are placed before listeners and two-channel speakers are placed behind the listeners and volumes and phases of sounds generated from each of the speakers are adjusted in accordance with movement of a sound source.
As another technique, the three-dimensional positioning system has been known, according to which a head-related transfer function (abbreviated xe2x80x9cHRTFxe2x80x9d), indicative of a sound transfer from a sound source to listener""s left and right ears, is measured previously in association with possible coordinates of the sound source and a coefficient of the head-related transfer function (HRTF) is varied dynamically as the coordinates of the sound source changes. With this three-dimensional positioning system, the overall system organization can be greatly simplified because only two-channel speakers and amplifiers corresponding to the left and right ears are sufficient for sound generation purposes.
FIG. 6 is a functional block diagram of a typical example of the three-dimensional positioning system. In the illustrated example, the three-dimensional positioning system employs three sound sources SG1, SG2 and SG3 which generate waveform data W1, W2 and W3, respectively. The positioning system also includes finite impulse response (FIR) filters, and characteristics of of each of these FIR filters F1 to F3 represents a head-related transfer function (HRTF) representative of a sound transfer from a sound source to listener""s left and right ears. Here, as the sound sources SG1, SG2 and SG3 move imaginarily, respective coefficients of the FIR filters F1 to F3 are varied dynamically in accordance with the changing coordinates of the sound sources SG1, SG2 and SG3.
The positioning system of FIG. 6 further includes adders A1 and A2, which add together output data from the FIR filters F1 to F3 so as to provide waveform data for the left (L) and right (R) channels. Note that the waveform data are generated from the adders A1 and A2 in accordance with the head-related transfer functions (HRTFS) assuming that sounds from the sound sources SG1, SG2 and SG3 are input directly to the left and right ears. Thus, no particular problem would arise if sound generator means are placed very close to the listener""s left and right ears and a sound from each of the sound generator means is listened to by only one of the two as in the case of headphones; however, if the left- and right-channel speakers are placed before the listener, then a sound from one of the speakers would reach both of the left and right ears, thereby causing unwanted crosstalk. Thus, a crosstalk processing section C is used in the illustrated example to generate left-channel waveform data DL and right-channel waveform data DR modified to cancel aural influences of the crosstalk. Note that whereas the operations up to those of the adders A1 and A2 are performed separately for each of the sounds, the crosstalk processing operations are performed collectively on all of the sounds.
Further, FIG. 7 is a block diagram showing a detailed construction of the FIR filter F1 employed in the system of FIG. 6. Assuming that the three-dimensional positioning system is provided within a personal computer, the FIR filter F1 is connected to a host driver (not shown) via a PCI (Peripheral Component Interconnect) bus unit or the like, and includes a DSP (Digital Signal Processor) 100 for performing arithmetic operations, such as multiplication and addition, a CPU 200 for controlling the DSP 100, a working memory 210 connected to the CPU 200 and an HRTF coefficient data memory 110 storing therein HRTF or head-related transfer function coefficient data. Thus, once a coordinates instruction P is given from the host driver via the bus unit to the FIR filter F1, the CPU 200, using the working memory 210, calculates an address indicating a storage region of HRTF coefficient data h corresponding to individual tap coefficients of the filter and sends the thus-calculated address to the DSP 100. Then, the DSP 100 reads out the HRTF coefficient data h from the HRTF coefficient data memory 110 and performs multiplication and addition operations between the HRTF coefficient data h and waveform data W1, so as to generate processed waveform data W1xe2x80x2.
Directional accuracy with which the sound source is to be localized depends on a data quantity of the HRTF coefficient data h. Therefore, for increased accuracy of sound image localization to achieve sounds full of a sense of presence, there has been a need to provide a great-capacity HRTF coefficient data memory 110 in the FIR filter F1. Further, because the conventional system has to interpret the coordinates instruction P given from the personal computer and thereby selectively read out the HRTF coefficient data h, there has been a need to provide the CPU 200 within the FIR filter F1 as a controller. Besides, because the host driver, in many cases, is provided with a CPU for controlling the overall operations of the personal computer and a great-capacity main memory, etc., the conventional system would encounter the problem that an overall size of electric circuitry in the FIR filter unavoidably increases and the circuit arrangements of the host driver can not be used effectively.
It is therefore an object of the present invention to provide a digital filtering method and device which are operable by being connected a computer bus and which achieve efficient digital filtering processing without increasing a size of electric circuitry employed.
It is another object of the present invention to provide a sound image localizing device which achieve high-quality sound image localization control without increasing a size of electric circuitry employed.
In order to accomplish the above-mentioned object, the present invention provides a digital filtering method which comprises: a first step of collectively transferring, via a bus of a computer, a plurality of samples of digital data to be filtered; a second step of executing filtering processing, based on a predetermined filter function, on the plurality of samples of digital data transferred by the first step, at a processing rate higher than a predetermined sampling rate; and a third step of buffering the digital data having been subjected to the filtering processing by the second step and then outputting, at the predetermined sampling rate, the digital data buffered thereby.
Because of the arrangement that a plurality of samples of digital data to be filtered are transferred collectively via the computer bus, it is possible to eliminate a need for the computer to send out the digital data in synchronism with a predetermined sampling cycle, and thus the digital data transfer is not substantially bound by time. As a consequence, the computer and bus can be used efficiently for any other purpose. Further, because the filtering processing by the second step carries out filtering arithmetic operations based on a predetermined filter function at a rate higher than a predetermined sampling rate, the filtering arithmetic operations, in an exemplary case where f samples of the digital data are to be filtered, can be conducted promptly without taking a time that would be normally required for filtering of the f samples. Via the bus, the first step can transfer individual blocks, each comprising a plurality of samples of the digital data, intermittently on a block-by-block basis, i.e., one block at a time. In response to the intermittent transfer of the blocks, the second step can execute the filtering arithmetic processing on the transferred blocks intermittently on the block-by-block basis. In the following third step, the data having been subjected to the filtering arithmetic processing by the second step are sequentially buffered and then output at the predetermined sampling rate, to provide normal filtered output data according to the predetermined sampling rate or cycle.
By virtue of the intermitted filtering arithmetic operations, the second step can perform the filtering processing for not only one channel but also a plurality of channels, by making efficient use of vacant time in the individual channels. Thus, the filtering arithmetic processing can be performed independently for each of the many channels, without increasing a size of electric circuitry employed.
In a preferred implementation, the first step divides a series of the digital data to be filtered into a plurality of data sections and intermittently transfers digital data blocks each comprising a plurality of samples (e.g., f samples) of the digital data belonging to one of the data sections, and when transferring the digital data belonging to any one of the data sections, the first step transfers, along with the digital data belonging to the one data section, part (e.g., n sample) of the digital data belonging to another of the data sections adjoining the one data section, to thereby transfer a time series of the digital data consisting of a greater number of samples (f+n samples) than a total number of samples (f samples) contained in the one data section. In response to the digital data transfer, the second step executes the filtering processing based on the predetermined filter function using that time series of the digital data consisting of a greater number of samples than a total number of samples contained in the one data section, to thereby provide filtered data corresponding to at least the total number of samples (f samples) contained in the one data section.
In this way, intermittent filtering arithmetic processing can be carried out effectively. Namely, assuming that a coefficient set to be used for the filtering arithmetic processing consists of a total of k filter coefficients, filtering arithmetic processing with kxe2x88x921 unit time delays, i.e., (kxe2x88x921)-order filtering arithmetic processing is executed and one sample of filtered data is provided through multiplying and adding operations for the k coefficients. To provide filtered data for f samples, at least f+k samples should be input as the time-serial digital data to be filtered. However, by setting the number of the samples to be transferred redundantly (i.e., n samples) to be equivalent to or greater than the number of the coefficients k (i.e., nxe2x89xa7k), it is possible to possible to provide filtered data corresponding to the total number of samples (f samples) contained in a single data section. The samples of the adjoining data section transferred redundantly are used when the filtering arithmetic processing is performed on the adjoining or next data section. For that purpose, the redundant samples are preferably retransferred at the data transfer stage of the first step with respect to the next data section, although they may be stored by the second step in readiness for the filtering arithmetic processing. While storing the redundant samples at the filtering processing stage of the second step may increase the size of the electric circuitry to some degree, retransferring the redundant samples in the first step is advantageous in that it can be done simply without requiring an additional register.
In a preferred implementation, a predetermined number of interpolating samples (e.g., j samples ) of digital data may further be included as the part of the digital data belonging to the other data section. Thus, the second step provides the filtered data consisting of a sum of the total number of samples contained in the one data section and the predetermined number of interpolating samples (e.g., f+j samples). In this case, the filtering method further comprises a fourth step of buffering, for the data section, a part of the filtered data that corresponds to the predetermined number of interpolating samples (j samples), and a fifth step of executing a predetermined interpolating process using the part of the filtered data that is buffered by the fourth step in the preceding data section and another part of the filtered data that corresponds to the total number of samples (f samples) contained in the current data sections.
This way, with respect to the redundant or duplicated j samples, interpolation is carried out between results of the filtering arithmetic processing based on the filter coefficients used in the preceding data section and results of the filtering arithmetic processing based on the filter coefficients used in the current data section, so as to provide j data as a result of the interpolation. These j interpolated data are output, along with kxe2x88x92j filtered data, by the third step as a total of k samples of filtered and interpolated data. With this arrangement, even when the coefficient sets used in the filtering arithmetic processing for the preceding data section and the current data section are different in content (i.e., even when the filter coefficients have varied over time), the filtered data for the two data sections can be interconnected smoothly through the interpolation.
In a preferred implementation, the first step also transfers, via the bus, a set of coefficients to be used in the filtering processing, and the second step executes the filtering processing using the set of coefficients transferred by the first step. This arrangement eliminates a need to provide a memory for prestoring a plurality of sets of filter coefficients in association with the second step, i.e., a filtering arithmetic processor such as a DSP, and thus there is no need to increase the size of the electric circuitry. Although a large-capacity coefficient memory would be required where the filter coefficients are to be time-varied, arrangements for transferring only necessary coefficient sets via the bus may eliminate a need to provide such a large-capacity memory in or in association with the filtering arithmetic processor, in this case, the large-capacity memory can be provided in or in association with a host computer. Even in a situation where the filter coefficients are not to be time-varied, and when a particular process, such as sound image localization control, is to be performed where a coordinates position of sound image localization is analyzed so that a filter coefficient set is selectively read out in accordance with an analyzed coordinates position, the provision of the coefficient memory in or in association with the host computer facilitates complex analyzing operations in the host computer. In this respect as well, the present invention can significantly simplify the construction of the filtering arithmetic processor and other components associated with the processor.
Of course, in some cases, the coefficient sets to be used in the filtering arithmetic processing by the second step may be prestored in a memory or the like of the filtering arithmetic processor, rather than being transferred via the bus. Where the filter coefficients are not to be time-varied, it is only necessary that just a single set of the filter coefficients be prestored, and thus the memory may not be required to have a particularly great capacity. Where no complex coordinates analysis is required for sound image localization, such analyzing operations may not be required. In these cases, the coefficient sets to be used in the filtering arithmetic processing can be prestored in a memory or the like of the filtering arithmetic processor.
As an example, the first step is executed by a program associated with a general-purpose processor of the computer, and the second step and third step are executed by a program associated with a filtering processor connected to the bus. Thus, the high-power host computer can be effectively prevented from being wastefully bound due to execution of the filtering processing, so that the host computer can be used with increased efficiency. In addition, the present invention allows the filtering arithmetic processor to efficiently carry out the digital filtering processing without increasing the size of the necessary electric circuitry and associated software.
According to another aspect of the present invention, there is provided a digital filter device for connection to a bus of a computer, which comprises: an interface section that collectively receives, via the bus, a predetermined number of samples of digital data at one or more desired points within a predetermined frame period; a filtering arithmetic processing section that executes predetermined filtering arithmetic processing on the digital data received by the interface section; and an output section that buffers filtered data outputted by the filtering arithmetic processing section and then outputs the filtered data buffered thereby. In a preferred implementation, the filtering arithmetic processing section executes the filtering arithmetic processing asynchronously with a predetermined sampling cycle, or at a higher rate than a predetermined sampling rate. In this case, the output section outputs the buffered filtered data in synchronism with a predetermined sampling cycle. The interface section receives a predetermined number of samples of the digital data for individual ones of a plurality of channels at different points within the frame period, and the filtering arithmetic processing section executes the filtering arithmetic processing for the individual channels within the frame period. In such a case, the output section buffers filtered data of the individual channels, from the filtering arithmetic processing section, while adding together the filtered data of the individual channels on a per-sample-point basis. Further, the interface section also receives, via the bus, a set of coefficients to be used in the filtering arithmetic processing section, and the filtering arithmetic processing section executes the filtering arithmetic processing using the set of coefficients received by the interface section.
It will be appreciated that the digital filtering method and/or device of the present invention can be applied to processing in a variety of fields, including, of course, processing of digital tone signals. Namely, the digital filtering method and/or device could be used most suitably as a method and/or device for performing efficient filtering processing in conjunction with a computer and afford superior benefits in terms of both an enhanced time-effective use of the computer and reduction in the size of the electric circuitry. The term xe2x80x9ccomputerxe2x80x9d as used in connection with the present invention should be interpreted in the broadest sense, and the term embraces not only standalone-type computer devices, equipment and facilities, such as personal computers and large-scale host computers, but also CPU-based microcomputer devices and chips incorporated in a variety of devices equipment and facilities. As an example, the basic principle of the present invention may be applied even to such a case where a microcomputer device is built in an electronic game machine, other particular computer-based device or equipment or some type of multimedia equipment and an filtering processor (such as a DSP) is connected to its bus.
For example, application of the present invention to sound image localization control can impart a high-quality sound image localization effect to a tone signal. Specifically, the present invention provides a sound image localizing device for dividing waveform data into a plurality of frames each comprising f samples and intermittently imparting a sound image localization effect to the waveform data on a frame-by-frame basis, which comprises: a first storage section that prestores therein coefficient data corresponding to positional information representative of possible positions of a sound source; a second storage section that stores therein the waveform data; an FIR-filtering arithmetic processing section that has k taps and generates filtered output data on the basis of the coefficient data and waveform data; a bus that is connected to the first storage section, second storage section and FIR-filtering arithmetic processing section and capable of burst transmission; and a control section that reads out, from the first storage section, a group of k coefficient data corresponding to the positional information of a current one of the frames and reads out, on a frame-by-frame basis, more than f+k samples of the waveform data from the second storage section in such a manner that more than the k samples of the waveform data are duplicated between the current frame and a next one of the frames adjoining the current frame, and that executes control such that the coefficient data and waveform data read out thereby are burst-transmitted via the bus to the FIR-filtering arithmetic processing section.
The control section may execute control such that the read-out coefficient data and waveform data are burst-transmitted at such short intervals that movement of the sound source can not be identified through human auditory sense. Further, the positional information may represent a position of the sound source at a substantially middle point in the frame.
Finally, the present invention can be arranged and practiced as a method invention as well as a device invention. Further, the present invention can be implemented as a computer program or microprograms for execution by a DSP or the like and also as a recording medium containing such a computer program or microprograms.